Welcome Guest | Sign in | Register

Home > C Programming > Command Line Arguments > Questions and Answers

Exercise:

Section 1

01. Which variable stores the number of arguments to a program?
A. argc B. argv
C. count D. arglen

Answer and Explanation

Answer: argc

Explanation:
There is no explanation...

Report Errors

Name:

Loading...

VView Answer | RReport | DDiscuss in Forum
02. What is argv[0]?
A. The number of arguments to the program B. The name of the program
C. The first argument to the program D. This syntax is illegal

Answer and Explanation

Answer: The name of the program

Explanation:
There is no explanation...

Report Errors

Name:

Loading...

VView Answer | RReport | DDiscuss in Forum
03. What type is argv?
A. char * B. int
C. char ** D. It's not a variable

Answer and Explanation

Answer: char **

Explanation:
There is no explanation...

Report Errors

Name:

Loading...

VView Answer | RReport | DDiscuss in Forum
04. In what order do the two command line variables appear in the definition of main?
A. Count then argument array B. Argument array then count
C. They don't appear in the definition of main D. There is only one argument.

Answer and Explanation

Answer: Count then argument array

Explanation:
There is no explanation...

Report Errors

Name:

Loading...

VView Answer | RReport | DDiscuss in Forum
05. What does the argument count variable store?
A. the number of arguments B. the number of arguments plus one
C. the number of arguments minus one D. The total size of the argument array

Answer and Explanation

Answer: the number of arguments plus one

Explanation:
There is no explanation...

Report Errors

Name:

Loading...

VView Answer | RReport | DDiscuss in Forum



Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.